<% page_title "Login" %>
<div class="login-wrapper fade-in">
  <h1 class="login-brand">Samson</h1>
  <div class="login">
    <% if Rails.application.config.samson.auth.values.none? %>
      You cannot signup or login since no auth provider is configured.<br/>
      Please configure them via the AUTH_* environment variables as documented in
      <%= link_to '.env.example', 'https://github.com/zendesk/samson/blob/master/.env.example' %>.
    <% else %>
      <% ['Github', 'Google', 'LDAP', 'Gitlab', 'Bitbucket'].each do |provider| %>
        <% if Rails.application.config.samson.auth.public_send(provider.downcase) %>
          <%= link_to omniauth_path(provider.downcase.to_sym), class: "action #{provider.downcase}", method: :post do %>
            <%= image_tag image_url("#{provider.downcase}.png") %> Login with <%= provider %>
          <% end %>
        <% end %>
      <% end %>
    <% end %>
  </div>
</div>
